<template>
  <div>
    <el-select v-model="defaultValue" :placeholder="placeholder?placeholder:'请选择'" clearable  @change="handleChange" style="margin-right:10px;">
      <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
    </el-select>
  </div>
</template>

<script>
export default {
  props:["paramsName",'placeholder',"options"],
  data() {
    return {
      defaultValue: ""
    }
  },
  methods:{
    handleChange(){
      // console.log(this.defaultValue,this.paramsName)
      this.$emit('handleChange',this.defaultValue,this.paramsName)
    },
    rest(){
      this.defaultValue = ''
      this.handleChange()
    }
  }
};
</script>